layui.define(['jquery','layer','form','element'], function (exports) {
     var $ = layui.jquery;
     var  layer = layui.layer;
     var form = layui.form();
     var element = layui.element();
     var edit_grade=function(){};

     edit_grade.prototype.init=function(){
         $.post("/srv/rdo.php?", {tpl:"getDct",name:"学段"}, function (d, e) {
           selectShowDataNoH("#xid",JSON.parse(d),"id","name");
           $("#xid").prepend("<option value=''>选择学段</option>");
           $("#xid").val($("#sid").val());
           form.render('select');
        });

        var index = parent.layer.getFrameIndex(window.name);
        $('#btn_save').click(function(){
            if($("#grade_name").val()==""){layer.msg("学科名称不能为空");return false;}
            parent.layer.close(index);
        });
     }   
     
     var editSubject=new edit_grade();
     editSubject.init();

     exports('system_edit_subject', editSubject);
});